﻿using Microsoft.EntityFrameworkCore;
using WebApiThird.Entity;

namespace WebApiThird
{
    public class AppDbContext: DbContext
    {
        public DbSet<Student> Students { get; set; }
        public AppDbContext(DbContextOptions options): base(options)
        {

        }

        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            base.OnModelCreating(modelBuilder);
            modelBuilder.ApplyConfigurationsFromAssembly(this.GetType().Assembly);
        }
    }
}
